package com.zhentao.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 二手车评估记录表
 * @TableName used_car_evaluation
 */
@TableName(value ="used_car_evaluation")
@Data
public class UsedCarEvaluation implements Serializable {
    /**
     * 评估ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 车牌号
     */
    private String licensePlate;

    /**
     * 品牌
     */
    private String brand;

    /**
     * 车型
     */
    private String model;

    /**
     * 年份
     */
    private Integer year;

    /**
     * 里程数(万公里)
     */
    private BigDecimal mileage;

    /**
     * 排量(L)
     */
    private BigDecimal engineDisplacement;

    /**
     * 变速箱类型
     */
    private String transmission;

    /**
     * 燃料类型
     */
    private String fuelType;

    /**
     * 颜色
     */
    private String color;

    /**
     * 车况评分(1-10)
     */
    private BigDecimal conditionRating;

    /**
     * 外观状况
     */
    private String exteriorCondition;

    /**
     * 内饰状况
     */
    private String interiorCondition;

    /**
     * 机械状况
     */
    private String mechanicalCondition;

    /**
     * 事故历史(0:无,1:有)
     */
    private Integer accidentHistory;

    /**
     * 事故描述
     */
    private String accidentDescription;

    /**
     * 保养历史
     */
    private String maintenanceHistory;

    /**
     * 评估价值(万元)
     */
    private BigDecimal estimatedValue;

    /**
     * 价值范围最小值
     */
    private BigDecimal valueRangeMin;

    /**
     * 价值范围最大值
     */
    private BigDecimal valueRangeMax;

    /**
     * 评估因素(JSON)
     */
    private String evaluationFactors;

    /**
     * 评估备注
     */
    private String evaluationNotes;

    /**
     * 状态(0:无效,1:有效)
     */
    private Integer status;

    /**
     * 评估师ID
     */
    private Long evaluatorId;

    /**
     * 评估时间
     */
    private Date evaluationTime;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UsedCarEvaluation other = (UsedCarEvaluation) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getLicensePlate() == null ? other.getLicensePlate() == null : this.getLicensePlate().equals(other.getLicensePlate()))
            && (this.getBrand() == null ? other.getBrand() == null : this.getBrand().equals(other.getBrand()))
            && (this.getModel() == null ? other.getModel() == null : this.getModel().equals(other.getModel()))
            && (this.getYear() == null ? other.getYear() == null : this.getYear().equals(other.getYear()))
            && (this.getMileage() == null ? other.getMileage() == null : this.getMileage().equals(other.getMileage()))
            && (this.getEngineDisplacement() == null ? other.getEngineDisplacement() == null : this.getEngineDisplacement().equals(other.getEngineDisplacement()))
            && (this.getTransmission() == null ? other.getTransmission() == null : this.getTransmission().equals(other.getTransmission()))
            && (this.getFuelType() == null ? other.getFuelType() == null : this.getFuelType().equals(other.getFuelType()))
            && (this.getColor() == null ? other.getColor() == null : this.getColor().equals(other.getColor()))
            && (this.getConditionRating() == null ? other.getConditionRating() == null : this.getConditionRating().equals(other.getConditionRating()))
            && (this.getExteriorCondition() == null ? other.getExteriorCondition() == null : this.getExteriorCondition().equals(other.getExteriorCondition()))
            && (this.getInteriorCondition() == null ? other.getInteriorCondition() == null : this.getInteriorCondition().equals(other.getInteriorCondition()))
            && (this.getMechanicalCondition() == null ? other.getMechanicalCondition() == null : this.getMechanicalCondition().equals(other.getMechanicalCondition()))
            && (this.getAccidentHistory() == null ? other.getAccidentHistory() == null : this.getAccidentHistory().equals(other.getAccidentHistory()))
            && (this.getAccidentDescription() == null ? other.getAccidentDescription() == null : this.getAccidentDescription().equals(other.getAccidentDescription()))
            && (this.getMaintenanceHistory() == null ? other.getMaintenanceHistory() == null : this.getMaintenanceHistory().equals(other.getMaintenanceHistory()))
            && (this.getEstimatedValue() == null ? other.getEstimatedValue() == null : this.getEstimatedValue().equals(other.getEstimatedValue()))
            && (this.getValueRangeMin() == null ? other.getValueRangeMin() == null : this.getValueRangeMin().equals(other.getValueRangeMin()))
            && (this.getValueRangeMax() == null ? other.getValueRangeMax() == null : this.getValueRangeMax().equals(other.getValueRangeMax()))
            && (this.getEvaluationFactors() == null ? other.getEvaluationFactors() == null : this.getEvaluationFactors().equals(other.getEvaluationFactors()))
            && (this.getEvaluationNotes() == null ? other.getEvaluationNotes() == null : this.getEvaluationNotes().equals(other.getEvaluationNotes()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getEvaluatorId() == null ? other.getEvaluatorId() == null : this.getEvaluatorId().equals(other.getEvaluatorId()))
            && (this.getEvaluationTime() == null ? other.getEvaluationTime() == null : this.getEvaluationTime().equals(other.getEvaluationTime()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getLicensePlate() == null) ? 0 : getLicensePlate().hashCode());
        result = prime * result + ((getBrand() == null) ? 0 : getBrand().hashCode());
        result = prime * result + ((getModel() == null) ? 0 : getModel().hashCode());
        result = prime * result + ((getYear() == null) ? 0 : getYear().hashCode());
        result = prime * result + ((getMileage() == null) ? 0 : getMileage().hashCode());
        result = prime * result + ((getEngineDisplacement() == null) ? 0 : getEngineDisplacement().hashCode());
        result = prime * result + ((getTransmission() == null) ? 0 : getTransmission().hashCode());
        result = prime * result + ((getFuelType() == null) ? 0 : getFuelType().hashCode());
        result = prime * result + ((getColor() == null) ? 0 : getColor().hashCode());
        result = prime * result + ((getConditionRating() == null) ? 0 : getConditionRating().hashCode());
        result = prime * result + ((getExteriorCondition() == null) ? 0 : getExteriorCondition().hashCode());
        result = prime * result + ((getInteriorCondition() == null) ? 0 : getInteriorCondition().hashCode());
        result = prime * result + ((getMechanicalCondition() == null) ? 0 : getMechanicalCondition().hashCode());
        result = prime * result + ((getAccidentHistory() == null) ? 0 : getAccidentHistory().hashCode());
        result = prime * result + ((getAccidentDescription() == null) ? 0 : getAccidentDescription().hashCode());
        result = prime * result + ((getMaintenanceHistory() == null) ? 0 : getMaintenanceHistory().hashCode());
        result = prime * result + ((getEstimatedValue() == null) ? 0 : getEstimatedValue().hashCode());
        result = prime * result + ((getValueRangeMin() == null) ? 0 : getValueRangeMin().hashCode());
        result = prime * result + ((getValueRangeMax() == null) ? 0 : getValueRangeMax().hashCode());
        result = prime * result + ((getEvaluationFactors() == null) ? 0 : getEvaluationFactors().hashCode());
        result = prime * result + ((getEvaluationNotes() == null) ? 0 : getEvaluationNotes().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getEvaluatorId() == null) ? 0 : getEvaluatorId().hashCode());
        result = prime * result + ((getEvaluationTime() == null) ? 0 : getEvaluationTime().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", licensePlate=").append(licensePlate);
        sb.append(", brand=").append(brand);
        sb.append(", model=").append(model);
        sb.append(", year=").append(year);
        sb.append(", mileage=").append(mileage);
        sb.append(", engineDisplacement=").append(engineDisplacement);
        sb.append(", transmission=").append(transmission);
        sb.append(", fuelType=").append(fuelType);
        sb.append(", color=").append(color);
        sb.append(", conditionRating=").append(conditionRating);
        sb.append(", exteriorCondition=").append(exteriorCondition);
        sb.append(", interiorCondition=").append(interiorCondition);
        sb.append(", mechanicalCondition=").append(mechanicalCondition);
        sb.append(", accidentHistory=").append(accidentHistory);
        sb.append(", accidentDescription=").append(accidentDescription);
        sb.append(", maintenanceHistory=").append(maintenanceHistory);
        sb.append(", estimatedValue=").append(estimatedValue);
        sb.append(", valueRangeMin=").append(valueRangeMin);
        sb.append(", valueRangeMax=").append(valueRangeMax);
        sb.append(", evaluationFactors=").append(evaluationFactors);
        sb.append(", evaluationNotes=").append(evaluationNotes);
        sb.append(", status=").append(status);
        sb.append(", evaluatorId=").append(evaluatorId);
        sb.append(", evaluationTime=").append(evaluationTime);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}